package cn.flying.cloud.system.dict.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import cn.flying.cloud.system.dict.model.DictData;

/**
 * 枚举字典 Mapper 接口
 *
 * @author admin
 * @since 2024-04-02 13:05:04
 */
@Mapper
public interface DictDataMapper {


    @Select("select * from sys_dict_data where status = 'Y' and deleted = '0' and dict_type = #{type} and tenant_id = #{tenantId}")
    @Results({
            @Result(column = "dict_type", property = "dictType"),
            @Result(column = "dict_desc", property = "dictDesc"),
            @Result(column = "code", property = "code"),
            @Result(column = "text", property = "text"),
            @Result(column = "tenant_id", property = "tenantId"),
    })
    List<DictData> getDict(@Param("type") String type, @Param("tenantId") String tenantId);

}
